package com.woyou.bean;

/**
 * SubGoods类型说明
 * 
 * @author 荣
 * 
 */
@SuppressWarnings("serial")
public class SubGoods extends SuperBean{

	/**
	 * 菜品编号
	 */
	private String gId;
	
	/**
	 * 商品图片
	 */
	private String picUrl;
	
	/**
	 * 菜品名称
	 */
	private String gName;
	
	/**
	 * 单价
	 */
	private float price;
	
	/**
	 * 已选择的份数（购物车）
	 */
	private int chosenNum = 0;
	
	/**
	 * 单位
	 */
	private String unit;
	
	/**
	 * 缺货标志(1:正常,0暂缺)
	 */
	private int state;

	public String getgId() {
		return gId;
	}

	public void setgId(String gId) {
		this.gId = gId;
	}

	public String getPicUrl() {
		return picUrl;
	}

	public void setPicUrl(String picUrl) {
		this.picUrl = picUrl;
	}

	public String getgName() {
		return gName;
	}

	public void setgName(String gName) {
		this.gName = gName;
	}

	public float getPrice() {
		return price;
	}

	public void setPrice(float price) {
		this.price = price;
	}

	public int getChosenNum() {
		return chosenNum;
	}

	public void setChosenNum(int chosenNum) {
		this.chosenNum = chosenNum;
	}

	public String getUnit() {
		return unit;
	}

	public void setUnit(String unit) {
		this.unit = unit;
	}

	public int getState() {
		return state;
	}

	public void setState(int state) {
		this.state = state;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((gId == null) ? 0 : gId.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		SubGoods other = (SubGoods) obj;
		if (gId == null) {
			if (other.gId != null)
				return false;
		} else if (!gId.equals(other.gId))
			return false;
		return true;
	}
	

}
